import { View } from '@tarojs/components'
import Card from 'components/CodeCard'
import { useState } from 'react'
import code from './code.md'
import s from './index.module.scss'

export default function Background() {
  const [show,setShow] = useState(true)
  return(
    <View>
      <Card
        title='background'
        desc='是所有背景属性的简写，但css仅有 background-color/position/size 支持动画效果'
        renderCode={() =>(
          show ? <wemark md={code} link highlight type='wemark' /> : null
        )}
        btn={() => (show ? setShow(false) : setShow(true))}
      >
        <View className={s.container}>
          <View className={s.box_4}></View>
        </View>
      </Card>
    </View>
  )
}